//
//  ViewController.m
//  BaiKT
//
//  Created by HOCVIEN on 4/21/15.
//  Copyright (c) 2015 HuynhTridung. All rights reserved.
//   2d64c4bc219c56f7509860a5afa36fe1

#import "ViewController.h"
#import "GetData.h"
#import "CustomCell.h"
@interface ViewController () {
    NSDictionary *data;
    int count;
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    data = [[NSDictionary alloc]init];
    data = [GetData loadData];
    NSLog(@"%@", data);
    NSLog(@"%@", data[@"count"]);
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}

// Row display. Implementers should *always* try to reuse cells by setting each cell's reuseIdentifier and querying for available reusable cells with dequeueReusableCellWithIdentifier:
// Cell gets various attributes set automatically based on table (separators) and data source (accessory views, editing controls)

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    CustomCell* cell = [tableView dequeueReusableCellWithIdentifier:@"CustomCell"];
    if (cell) {
        [tableView registerClass:[CustomCell class] forCellReuseIdentifier:@"CustomCell"];
        cell = [tableView dequeueReusableCellWithIdentifier:@"CustomCell"];
    }
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
